package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * MemberSpend entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_MEMBER_SPEND", schema = "HCD_DEV")
public class MemberSpend extends Entity implements java.io.Serializable {

	// Fields

	private String serialCode;
	private Member member;
	private Boolean isChecked;
	private Float spend;
	private Long spendTime;

	// Constructors

	/** default constructor */
	public MemberSpend() {
	}

	/** full constructor */
	public MemberSpend(String serialCode, Member member, Boolean isChecked, Float spend,
			Long spendTime) {
		this.serialCode = serialCode;
		this.member = member;
		this.isChecked = isChecked;
		this.spend = spend;
		this.spendTime = spendTime;
	}

	// Property accessors
	@Id
	@Column(name = "SERIAL_CODE", unique = true, nullable = false, length = 50)
	public String getSerialCode() {
		return this.serialCode;
	}

	public void setSerialCode(String serialCode) {
		this.serialCode = serialCode;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEMBER_ID", nullable = false)
	public Member getMember() {
		return this.member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	@Column(name = "IS_CHECKED", nullable = false, precision = 1, scale = 0)
	public Boolean getIsChecked() {
		return this.isChecked;
	}

	public void setIsChecked(Boolean isChecked) {
		this.isChecked = isChecked;
	}

	@Column(name = "SPEND", nullable = false, precision = 8)
	public Float getSpend() {
		return this.spend;
	}

	public void setSpend(Float spend) {
		this.spend = spend;
	}

	@Column(name = "SPEND_TIME", nullable = false, precision = 15, scale = 0)
	public Long getSpendTime() {
		return this.spendTime;
	}

	public void setSpendTime(Long spendTime) {
		this.spendTime = spendTime;
	}

}